In this paper, we propose an algorithmic approach for a motion analysis framework to automatically recognize local muscular endurance (LME) exercises and to count their repetitions using a wrist-worn inertial sensor. LME exercises are prescribed for cardiovascular disease rehabilitation. As a technical solution, we propose activity recognition based on machine learning. We developed an algorithm to automatically segment the captured data from all participants. Relevant time and frequency domain features were extracted using a sliding window technique. Principal component analysis (PCA) was applied for dimensionality reduction of the extracted features. We trained 15 binary classifiers using support vector machine (SVM) to recognize individual LME exercises, achieving overall accuracy of more than 98%. We applied grid search technique to obtain the optimal SVM hyperplane parameters. The learning curves (mean ± stdev) for each model is investigated to verify that the models were not over-fitted and performed well on any new test data. Also, we devised a method to count the repetitions of the upper body exercises.