Stick table storing url hits

Hello
I would like to setup haproxy to do the following:
Haproxy records visited urls and counts hits for every visited url.
Depending on hit count, if the visited url is above arbitrary threshold of let’s say 3 hits, it would be sent to specific backend, if below it would go to default backend.

Unfortunately I don’t know how to setup stick table storing information I need and use it in acl.
I would be grateful for example how to do that.

Solved:

http-request set-var(txn.path) path
http-request track-sc0 var(txn.path) table T
use_backend cache if { sc0_http_req_cnt gt 2 }

default_backend nocache

backend T
stick-table type string len 256 size 50k expire 7d store http_req_cnt