Getting the exact count of rows in Postgres database
It seems there is currently no built-in way to do what you require in PostgreSQL.


  People are working toward such capabilities.  While nobody can say
  with any certainty when such features will make it into a
  PostgreSQL release, I think it's safe to predict that it will not
  be before late 2017, and most probably later than that.


Meanwhile, you could manually implement a solution using triggers; for example as described in Postgresql General Bits by A. Elein Mustain.

The idea is to maintain an always-current row count in a separate table using triggers. Be aware that this may add significant overhead to data modifications.