let document = HtmlWeb().Load("https://github.com");
let rec leafNodes (node:HtmlNode) =
if node.HasChildNodes then
yield! node.ChildNodes |> Seq.collect leafNodes
else if node.ParentNode.Name <> "script" && node :? HtmlTextNode then
yield node :?> HtmlTextNode
document.DocumentNode |> leafNodes
|> Array.filter (not << System.String.IsNullOrWhiteSpace))
|> Seq.filter (not << Seq.isEmpty)
|> Seq.sumBy Array.length