Nowadays, smartphones become very popular in our daily activities. Current phone models have been integrated with high-accuracy built-in sensors. Many developers have been taking advantage of those sensors to build useful applications. Tracking user's activities via smartphones is one of the hot topics in research community. Step detection or step counting is one of the key problems in the field of understanding user's activities. There are a few research work and many commercial smartphone applications to detect or count the user's steps. In other work, researchers have tried to detect or count the steps by attaching the phone into a specific position. In this paper, we propose a new method based on Kalman Filter to detect and count the user's step with higher accuracy using built-in accelerometer in iOS. In our experiments, we allow users to hold the phone in hand or keep it in the pocket. The experimental results show that our approach gives better results than other commercial applications in the market.