Hi, I am also looking at hacking the DS-D6, well, actually the Lenovo HX03W. I am a bit disappointed that the accelerometer does not include step counting out of the box!
As for the algorithm I can point at this research we made some time ago exactly with the idea of having an open and validated step counting algorithm. The only problem is that the implementation is either in python or Java, not in C.
If anyone has some time, you could port it to C, the algorithm is quite simple and does not require any strange dependency.