I don’t fully follow what you’re asking here - the numbers make it confusing.
But I think you’re asking for this:
https://ghost.org/tutorials/related-posts-block/
And specifically this:
{{#get "posts" limit="5" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags" as |related|}}
{{/get}}
Which is designed to fetch all posts with at least one tag the same as the current post, and behind the scenes Ghost automagically orders them by the number of matches. So a post with 2 matching tags appears before a post with one matching tag.