# [JavaScript (Node.js)], <s>88</s> 86 bytes <!-- language-all: lang-javascript --> a=>g=(x,y,c=0)=>a.map((p,i)=>p.map((q,j)=>c+=q-8?0:1/y?(x-j)**2+y*y<3:g(j,i)<2,y--))|c [Try it online!][TIO-joe6lgmj] [JavaScript (Node.js)]: https://nodejs.org [TIO-joe6lgmj]: https://tio.run/##dVHRjoJADHy/L9nF4rGLC4sR/RDiA@GUSFTwvFwkuX/npoXcy2Vjgp1u25lpu/q7fjafl@Ervvcfp@lcTnW5b0v1opGaMtHlvl7f6kGpgS4Awwwe1AE0q/IR@0OyNe/jQb3iTkeRXY3RuEu3rerQsLM0xrHWP83U9Pdnfz2tr32rzqqqPG3IUUbuSFVBKTH2iBNEGRnJZ5RTAWwRe/znqLHHo1Zav/2fx92W0sC7A8dGKlxwhgMHlIQYWB0rCbxDG/qdcLADL6odfuEOB0fs3fy5tHCZiw5sRXbjBXOllZnclSA2sqkCGbPMmTdqgvpDm3OiIBOmXDgL8WJnJeKI71MAp5yVGivY4AtWudasNeXriRt@m2v84i8Vhcy2Qd4FFZnlmk64PPwurqZf "JavaScript (Node.js) – Try It Online" Thank Arnauld for 2 bytes