Suppress error message in shell script

Hi All

this is a simple script

#! /bin/bash

FileCnt=`ls -lrt $DIR/* | wc -l`
echo $FileCnt

how could i escape the error msg if there are no files in $DIR

ls: /home/sayantan/test/files/cnt/*: No such file or directory
0

Looking forward for a quick reply

Regards, Newbie
Happy New Year

Use this:

FileCnt=`ls -lrt $DIR/* 2>/dev/null| wc -l`
ls -lrt $DIR/* 2> /dev/null | wc -l`

Thanks a lot