I was also searching for this answer, then re-read the linked topic and others that referenced something like an attachment counter.
They are talking about topic links counter, which I suppose was used back then to directly link to attachments, but I think this isn’t done this way anymore.
On the linked topic above they’re testing clicks on an attachment which is actually a link to CloudFront, while AFAIK currently new attachments are proxied through a [instance]/uploads/short-url/[hash].[ext] route.
That said, I really think this is hugely useful and I’d also like to know if this is something planned to be supported on Discourse - using this upload route to increment an attachment counter and show this counter beside the attachment link, just like external links.