I'm assuming you are using the Scrum framework.
In Scrum we focus on a team's ability to get things done. A good way for a team to measure this is to use story points and to measure velocity. The velocity is a rolling average of the number of story points that the team has got done in the past few sprints.
If you follow this approach then when a story is not done in a sprint then no story points for that story will be associated with that sprint.
There is some debate about what happens to stories that get carried over to the next sprint. Some teams will re-estimate them based on how much work they think is remaining. Other teams think of this re-estimating as a form of waste and will simply move the story to the new sprint with the original story point estimate.
Remember that the velocity is a rolling average, so it doesn't particularly matter when the story points are counted.
This approach may feel uncomfortable. This is because it is human nature to associate story points with effort, rather than work that is done. However, you will find that in the long-run this approach will allow you to determine your team's capacity to get work done in a sprint, which is a good way to measure progress.