Counting doesn't give me the total number of records in a table

You know there are 100 records in this table but count(field) returns less than that.

Solution

Use count(*) to avoid skipping NULL values in a specific field ref.

Discussion

You try to count the number of diary entries in the system:

SELECT count(dy_notes) FROM diary;
   

You find that entries with NULL dy_notes are being skipped. This is the correct behaviour - count() only counts non-null values. The way of solving this is:

SELECT count(*) FROM diary;