There is no specific number of days you can spend in Canada without becoming a Canadian tax resident. Your residency is based on your facts and circumstances.
If you are in Canada for more than 183 days in the calendar year, you may be subject to the deemed residency rules. However, even if you spend fewer days in Canada, you may still be considered a factual resident for the period you are in Canada.
If you work in Canada prior to your relocation and commencement of Canadian tax residency, compensation for those workdays will be considered Canadian sourced income and taxable in Canada the same way as for any non-residents of Canada. If your home country has a tax treaty with Canada, that may impact its taxability.