Postgresql pgAdmin, count(*), max(pk_field) giving inconsistent results
Thanks to Hannah Vernon for pointing out the obvious truncation going on, which I'm quite annoyed with myself for not noticing.
Having re run all the queries above in psql, they return the full, non-truncated numbers. Re-running them again in the pgAdmin sql window, I get truncated values. What is most strange is that there is different precision in the truncation and it is reliably so. Who am I to guess at the logic, I'm sure it's a bug and I will look to see if there is a bug tracker for the software.
Many thanks to all for your comments.
EDIT
Here is a comment about column truncation in the FAQ, however it doesn't go into any detail. I would assume this is for long text columns rather than integers over 5 digits, and I can't see where the option it refers to are, but I thought it prudent to include it anyway:

Query tool columns truncated
Some columns are truncated when running a query in the query tool.
You can increase the query option &quot;max. chars per column&quot; for this.
Please note that there's another limit for this imposed by the
underlying windows control, which apparently doesn't allow more than
511 characters.  In pgAdmin V1.1 and up, we provide the function
&quot;execute to file&quot;, which has no column restrictions. [AP]

http://www.pgadmin.org/pgadmin3/faq/#ColTrunc