NODESCHOOL-73: Improvements for counting points