title: Terraform count error when condition with variables used
body: <p>Running Terraform 0.12.24 code that was upgraded from 0.11.15 and getting an error related to count on a resource. The count statement has a conditional in it and the line of code and error are:</p>
  
  <pre><code>75:   count                  = var.vpc_count == 0 || var.tgw_count == 0 ? 0 : var.vpc_count
  
  The "count" value depends on resource attributes that cannot be determined
  until apply, so Terraform cannot predict how many instances will be created.
  To work around this, use the -target argument to first apply only the
  resources that the count depends on.
  </code></pre>
  
  <p>Both of the variables are simple numbers, either 0 or 1 and are in the tfvars file and passed into the module.</p>
  
  <p>I have searched but couldn't find anything related to this error when the count has simple variables and a conditional in it.</p>
  
  <p>How can I get this to work?</p>
  
  <p>Here is the code inside the module</p>
  
  <pre><code>resource "aws_route" "private-1-tgw" {
    provider               = aws.acct
    count                  = "${var.vpc_count}" == 0 || "${var.tgw_count}" == 0 ? 0 : "${var.vpc_count}"
    route_table_id         = aws_route_table.private-1[0].id
    destination_cidr_block = "10.0.0.0/8"
    transit_gateway_id     = var.tgw_id
  }
  </code></pre>
  
  <p>Here is what is in tfvars file</p>
  
  <pre><code>hmi_vpc_count = 1
  tgw_count = 0
  </code></pre>
  
  <p>And here is the module call</p>
  
  <pre><code>module "hmi-vpc" {
    source = "../../modules/hmi-vpc"
  
    providers = {
      aws.acct = aws.acct
    }
  
    aws_account                   = var.aws_account
    aws_region                    = var.aws_region
    management_sg_rules           = var.management_sg_rules
    tgw_count                     = module.transit-gateway.tgw_id == "" ? 0 : var.tgw_count
    tgw_id                        = module.transit-gateway.tgw_id
    tags                          = var.tags
    vpc_cidr                      = var.hmi_vpc_cidr
    vpc_count                     = var.hmi_vpc_count
    vpc_dhcp_count                = var.hmi_vpc_dhcp_count
    vpc_dhcp_domain_name          = var.hmi_vpc_dhcp_domain_name
    vpc_dhcp_dns_servers          = var.hmi_vpc_dhcp_dns_servers
    vpc_dhcp_netbios_name_servers = var.hmi_vpc_dhcp_netbios_name_servers
    vpc_dhcp_ntp_servers          = var.hmi_vpc_dhcp_ntp_servers
    vpc_sn_private_1a_cidr        = var.hmi_vpc_sn_private_1a_cidr
    vpc_sn_private_1b_cidr        = var.hmi_vpc_sn_private_1b_cidr
    vpc_sn_private_1c_cidr        = var.hmi_vpc_sn_private_1c_cidr
    vpc_sn_public_1a_cidr         = var.hmi_vpc_sn_public_1a_cidr
    vpc_sn_public_1b_cidr         = var.hmi_vpc_sn_public_1b_cidr
  }
  </code></pre>