This question already has an answer here:
I know it's possible to get number of public Lightning channels from Lightning Network gossip and some implementations offer network graph and it can be queried. But it's not possible to see private non-routing channels there.
Can channel opening transactions be identified checking the blockchain? if not, what's the best way to estimate?
This is more of a theoretical query to understand the structure of messages used in lightning network channel opening bitcoin transactions.