I have just noticed that the contribution count does not equate to the number of contributions. I have not been able to narrow down the circumstances.
From the screenshot, it seems like the first contribution is done via test mode.
FYI, test contributions are not included in the count on the tabs. Though not sure why the second one is not included. Can you add a little more information for the second row of how it is done, civi version etc ?
Update: Also make sure the
financial_type_id used for the contribution is enabled from
Administer -> CiviContribute -> Financial Types.