counting quads in this script