sql query to get results specific rows but count of all the rows of table
with the count(), I want to get the count of all the rows present
irrespective of the where clause.

This can be done with an independent subquery in the select-list, if it returns a single value, as in:
select name, email, (select count(*) from users) as &quot;Total&quot; from users WHERE ...

Example:
postgres=&gt; select relname,(select count(*) from pg_class) as &quot;Total&quot;
           from  pg_class where relname like 'a%';

              relname              | Total 
-----------------------------------+-------
 administrable_role_authorizations |   348
 applicable_roles                  |   348
 attributes                        |   348

Note that from the point of view of the relational model, this is an unorthodox trick . Normally each query is an answer to one question with a structure of result that fits exactly that question. Doing two queries would be right here.