select count(*) from syscolumns where id in (select id from sysobjects where sysobjects.name = 'YourTableName')
Comment