the documentation says:
The current sprint is usually not counted when calculating the team's velocity. In the example above, the current sprint bar shows grey sections (like the bars for the predicted sprints) to represent this. The exception is when you have already completed more work in the current sprint than the work that was predicted to be completed. In this case, the current sprint (and the actual work completed) is used as one of the three sprints used to calculate the velocity. Also, the sprint bar will show green/blue sections, like the bars for completed sprints.
For example, in the chart above, if your team had already completed more than 4 story points in sprint 5, then the work completed in sprint 3, sprint 4, and sprint 5 would be used to calculate the velocity, rather than sprint 2, sprint 3 and sprint 4.
According to my test the current sprint is always counted.