calculate num points