So yeah, keep it under the transaction limit, and you won't fall afoul of the laws.
FYI: The limit for pistol transactions in California is 5. You can have 5 sales transactions per year and not be considered a "dealer". Each individual transaction can be any # of pistols.
Also: This law is not prosecuted very often, it's generally only used on folks who are obviously breaking the rules in a blatant manner. If you do happen to sell that 6th pistol transaction in a calendar year, it's unlikely anything will happen - but woe be upon you if you are selling multiple transactions / month and a pattern can be established that you are acting as an unlicensed dealer.