Migrated count neighbors function to board object