Shivi
It depends on the note
Think of it like this
Father Charles Goes Down And Ends Battle
F C G D A E B
Start and circle at C because C has no sharps or flats and if it has a flat go back and if it has a sharp go forward for the amount of sharps you have
So I don't know where you got 7 flats in b major for cause it has 5 sharps and if you start from c you go forward 5 steps
Also a handy tip is when writing music the first sharps will go in order of F C G D A E B
Flats will go the opposite way B E A D G C F
Erica
All major scales (If major scales are what you're primarily asking about) follow this pattern starting on the base notes:
WWHWWWH
W stands for "whole step"
H stands for "half step"
For example, the C major scale goes
CDEFGABC
C is the base note
D is a whole step from C
E is a whole step from D
F is a half step from E
G is a whole step from F
A is a whole step from G
B is a whole step from A
C is a whole step from B
WWHWWWH
If you look at piano keys, it makes a lot more sense