Answers.Body: <p>From the screenshot, it seems like the first contribution is done via test mode. </p>
  
  <p>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 ?</p>
  
  <p>Update: Also make sure the <code>financial_type_id</code> used for the contribution is enabled from <code>Administer -&gt; CiviContribute -&gt; Financial Types</code>.</p>
  
  <p>Path - <code>civicrm/admin/financial/financialType?reset=1</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T08:03:37.963Z
Answers.Text: I assumed that was the case but the second contribution has come via an online payment for an event. I have plenty of other instances where the count differs from the actuals. I will check to see if it has happened since the introduction of the ability to expand a contribution to show further detail.
  
  I am using Civi 4.7.14
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T08:06:38.377Z
Answers.Text: It seems to have happened sometime after March 2016.
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T08:55:37.043Z
Answers.Text: I've updated the answer which also seems to be the reason for not adding it to the count.
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T09:58:37.237Z
Answers.Text: The Financial Type is enabled. It is odd that the ones that appear to be excluded are the latest contributions: post a certain date but I cannot pinpoint that date. I have also looked at the contributions in the contributions table and cannot see any difference in more recent contributions which makes it really odd.
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T10:35:50.557Z
Answers.Text: The count is updated from [contributionCount function here.](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L2057-L2091). Maybe you should find something here of what query gets built in and how your row counts are getting skipped?
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T10:43:18.220Z
Answers.Text: I'll have a go - although my skills are more to do with configuration than coding and SQL.
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T22:07:25.863Z
Answers.Text: I've tried to understand why the counts are incorrect but am unable to follow the detail of the SQL. If I remove the pre set 'where clauses' I get  a count that that is three more than I expected. However that is caused by one contribution having four line items. I still need to get this resolved.
Answers.UserDisplayName: Martin Fuggle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T05:40:39.297Z
Answers.LastActivityDate: 2017-01-23T08:55:07.073Z
Answers.LastEditDate: 2017-01-23T08:55:07.073Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>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.</p>
  
  <p><a href="https://i.sstatic.net/R5hOI.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/R5hOI.jpg" alt="Number of contributions including list"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-23T04:52:00.750Z
Comments.Text: Test contributions are not included in the count
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-23T05:31:23.090Z
Comments.Text: @jitendrapurohit If you post that as an answer I'd upvote it!
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-23T07:30:02.083Z
Comments.Text: It says 1 completed. Maybe refresh browser?
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-23T07:56:43.427Z
Comments.Text: It's nothing to do with a browser caching issue.
Comments.UserDisplayName: Martin Fuggle
Tags: <contributions>
Title: Contribution count does not reflect number of contributions
ThreadText: # Contribution count does not reflect number of contributions
  
  (Asked by: username_0 on 2017-01-23)
  
  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.
  
  [![Number of contributions including list](https://i.sstatic.net/R5hOI.jpg)](https://i.sstatic.net/R5hOI.jpg)
  
  **Tags:** contributions
  
  > **Comments:**
  > **username_1**: Test contributions are not included in the count  
  > **username_2**: @jitendrapurohit If you post that as an answer I'd upvote it!  
  > **username_3**: It says 1 completed. Maybe refresh browser?  
  > **username_0**: It's nothing to do with a browser caching issue.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-23. Score: 3
  
  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`.
  
  Path - `civicrm/admin/financial/financialType?reset=1`.
  
  > **Comments:**
  > **username_0**: I assumed that was the case but the second contribution has come via an online payment for an event. I have plenty of other instances where the count differs from the actuals. I will check to see if it has happened since the introduction of the ability to expand a contribution to show further detail.  I am using Civi 4.7.14  
  > **username_0**: It seems to have happened sometime after March 2016.  
  > **username_1**: I've updated the answer which also seems to be the reason for not adding it to the count.  
  > **username_0**: The Financial Type is enabled. It is odd that the ones that appear to be excluded are the latest contributions: post a certain date but I cannot pinpoint that date. I have also looked at the contributions in the contributions table and cannot see any difference in more recent contributions which makes it really odd.  
  > **username_1**: The count is updated from [contributionCount function here.](https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L2057-L2091). Maybe you should find something here of what query gets built in and how your row counts are getting skipped?  
  > **username_0**: I'll have a go - although my skills are more to do with configuration than coding and SQL.  
  > **username_0**: I've tried to understand why the counts are incorrect but am unable to follow the detail of the SQL. If I remove the pre set 'where clauses' I get  a count that that is three more than I expected. However that is caused by one contribution having four line items. I still need to get this resolved.  
  
  ---
  
  