Gravitational frequency of stars with their planets and planets with other planets in the same system