Jelly, 18 16 15 bytes
Assumes self-connections may be any weight (i.e. they are not necessarily only either \$0\$ or the equal weight).
Jœcṗ2EÐḟœị³EƲ€S Try it online!
the two subsets of size 3 being ACE and BCD
With n=2 all 10 subsets of size 2 work as its symmetric.
How?
Jœcṗ2EÐḟœị³EƲ€S - Link: list of lists of integers, M; integer, n J - range of length of M = [1,2,3,...,length(M)] œc - Combinations of length n e.g. [[1,2,3],[1,2,4],[1,3,4],[2,3,4]] € - for each: Ʋ - last four links as a monad: ṗ2 - Cartesian power with 2 Ðḟ - discard if: E - all-equal (i.e. diagonal co-ordinates like [3,3]) œị - multi-dimensional index into: ³ - program's 3rd argument (1st input), M E - all equal? S - sum