Should I include a publication where I'm only acknowledged (and not one of the authors) in my CV? Suppose that I've helped other researchers with the statistical analyses for an epidemiological study and therefore I am acknowledged for that in the "Acknowledgments" section of the paper (something like "We thank andrea for his statistical support").

Obviously, this doesn't count as a publication for me, as I am not one of the authors. But if I include it in my CV, how much "weight" would a professor (or someone within the academia) give to that? I also have other publications where I am either the first author or one of the co-authors.

I am not thinking of a particular situation here (like applying for a grant or for a PhD position). I am just curious to know if it could be useful to put it into my CV or if it would just be irrelevant.
I've never seen anything like this on a CV.

If you have other publications, I certainly wouldn't include this. It would look like you are trying too hard to find something to put on your CV, which could do more harm than good. Let your publications stand for themselves.

One thing you could do when describing the various jobs you've had, is to include the statistical analysis work in the description of the activities you performed in that job. You could also mention it in the cover letter, if it is relevant for the job. Finally, do bring it up in the interview as an example of how you work in a collaboration.