Here's what Coronalabs says about this:
Corona SDK does not have any API's or any plugins that can count
steps. However you do have access to the acceleromenter which gets you
the raw data on the device's movement and compute steps yourself, but
this will only work while the phone is awake and the app is in the
foreground. Corona SDK is not designed to run in the background. There
is an assumption that there is a screen to draw to each frame.
We do have a product called Corona Enterprise that lets you talk to
other native SDKs. You could use it to collect your native data and
in theory have it run in the background and when the app wakes up, send the collected data to the Lua/Corona portion of the app to
display.
So if this doesn't stop you you could try to implement this:
Opening the Black Box: Publishing Pebble’s activity-tracking algorithms where they basically look for the most rhythmic frequency within a 5 second interval. If the calculated score is above a certain threshold it's considered running or walking.