Is possible to call the function for one id. Because on one page i show few activities with the short code [add_to_cart id=”3964″] and beside i will like to show the number of activities available.
If you need to make more advanced changes though you might find it useful to leverage a library like this one (though unofficial and not supported) or even just borrow some code from it to use in your own solution.