Shots that hit either the post or the crossbar are not considered Shots on Goal. Currently, they are quantified as a Missed Shot. These shots are included with shots that miss the net entirely; as such, they will appear in both Fenwick and Corsi totals (note that Corsi is just Fenwick plus blocked shots).
There's no way to extract these data currently.
However, we can estimate the relative frequency with which shots hit the crossbar versus shots that hit either post.
The net is 6 feet wide by 4 feet high. Since there are two posts, this means that (roughly) the crossbar is 6 linear feet and the posts are 8 linear feet.
Naively, then, one would expect that the crossbar is hit at a 3:4 ratio to the posts. However, while shooting, one typically picks one side of the net to shoot at. If you miss your shot while trying to pick a side, you're probably not going to hit the post on the other side of the goal, unless you're a very bad shooter. So really, the crossbar might get hit at a rate of about 3:2 compared to the post, or about 50% more shots hit the crossbar than hit the post.
This is just a naive approximation.
Practically speaking, shooters have very small windows with which to work. Goalies cover a lot of area quickly in today's NHL, and so shooters are often gunning for extremes. The posts provide a visual reference of your target. When the goalie is moving and changing angles, the posts provide a fixed frame of reference with strong visual contrast. Many shooters try to aim for the inside of the posts with their shots, because it's usually the farthest you can target from the goalie and still hope to score.
Probably more shots miss the net entirely than hit a post, and probably close to as many shots that hit the crossbar and go out (quantified as a miss) hit the crossbar and go in (quantified as a goal and a SOG).
When weighing this approximation against all total shots, I'd say hitting the crossbar is more rare than hitting any other similarly-sized window of the net, but without very accurate puck telemetry data, it's impossible to conclude that.